import request from '@/utils/request'

// 查询设备物料管理列表
export function listEquipmentMaterial(params) {
  return request({
    url: '/operation/web/operationEquipmentMaterialManagement/list',
    method: 'get',
    params
  })
}

// 获取物料类别下拉列表
export function getMaterialCategoryList() {
  return request({
    url: '/operation/web/operationEquipmentMaterialManagement/materialCategoryList',
    method: 'get'
  })
}

// 获取设备物料管理详细信息
export function getEquipmentMaterialDetail(id) {
  return request({
    url: `/operation/web/operationEquipmentMaterialManagement/${id}`,
    method: 'get'
  })
}

// 新增设备物料管理
export function addEquipmentMaterial(data) {
  return request({
    url: '/operation/web/operationEquipmentMaterialManagement',
    method: 'post',
    data
  })
}

// 修改设备物料管理
export function updateEquipmentMaterial(data) {
  return request({
    url: '/operation/web/operationEquipmentMaterialManagement',
    method: 'put',
    data
  })
}

// 删除设备物料管理
export function deleteEquipmentMaterial(ids) {
  return request({
    url: `/operation/web/operationEquipmentMaterialManagement/${ids}`,
    method: 'delete'
  })
}